<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_PUC;?>css/common_zj.css"/>
    <link rel="stylesheet" type="text/css" href="<?php echo ADMIN_PUC;?>css/main_zj.css"/>
    <script type="text/javascript" src="<?php echo ADMIN_PUC;?>js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="<?php echo ADMIN_PUC;?>js/jquery-1.4.2.min.js"></script>
</head>
<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <h1 class="topbar-logo none"><a href="index.html" class="navbar-brand">后台管理</a></h1>
            <ul class="navbar-list clearfix">
                <li><a class="on" href="<?php echo ADMIN_INDEX;?>">首页</a></li>
                <li><a href="#" target="_blank">网站首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li>欢迎您!<?php echo session('username');?></li>
                <li><a href="/car_peak/index.php/Admin/Backstage/adminedit/id/<?php echo session('id');?>">修改密码</a></li>
                <li><a href="/car_peak/index.php/Admin/Backstage/logout">退出</a></li>
            </ul>
        </div>
    </div>
</div>

<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
    <ul class="sidebar-list">
        <li>
            <a href="#"><i class="icon-font">&#xe003;</i>常用操作</a>
            <ul class="sub-menu">
                <li><a href="/car_peak/index.php/Admin/Backstage/lst.html"><i class="icon-font">&#xe008;</i>汽车管理</a></li>
            </ul>
        </li>
        <li>
            <a href="#"><i class="icon-font">&#xe018;</i>系统管理</a>
            <ul class="sub-menu">
                <li><a href="/car_peak/index.php/Admin/System/lst.html"><i class="icon-font">&#xe017;</i>系统设置</a></li>
                <li><a href="/car_peak/index.php/Admin/Admin/lst.html"><i class="icon-font">&#xe017;</i>管理员管理</a></li>
            </ul>
        </li>
    </ul>
</div>
</div>
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?php echo ADMIN_INDEX;?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">栏目管理</span></div>
        </div>
        <div class="search-wrap">
            <div class="search-content">
                <form action="" method="post">
                    <table class="search-tab">
                        <tr>
                            <th width="70">关键字:</th>
                            <td><input class="common-text" placeholder="请输入关键字或栏目名称" name="kw" value="<?php echo I('kw');?>" id="" type="text"></td>
                            <td><input class="btn btn-primary btn2" name="sub" value="查询" type="submit"></td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
        <div class="result-wrap">
            <form  name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="/car_peak/index.php/Admin/Backstage/add"class="btn btn-primary btn2">新增栏目</a>
                        <a id="batchDel" href="javascript:void(0)"><i class="icon-font"></i><input form="myform" formaction="/car_peak/index.php/Admin/Backstage/bdel" type="submit" class="btn btn-primary btn2" value="批量删除"/></a>
                        <a id="updateOrd" href="javascript:void(0)"><i class="icon-font"></i> <input form="myform" formaction="/car_peak/index.php/Admin/Backstage/sortcate" type="submit"class="btn btn-primary btn2"  value="更新排序"/></a>
                    </div>
                </div>
                <div class="result-content">
                    <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="allChoose" name="" id="check"type="checkbox"></th>

                            <th>排序</th>
                            <!--<th>ID</th>-->
                            <th>栏目名称</th>
                            <th>关键词</th>
                            <th>栏目级别</th>
                            <th>描述</th>
                            <!--<th>栏目类型</th>-->
                            <th>缩略图</th>
                            <th>操作</th>
                        </tr>
                        <?php if(is_array($cate)): $i = 0; $__LIST__ = $cate;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
                            <td class="tc"><input name="ids[]" value="<?php echo ($vo["id"]); ?>" class="check" type="checkbox"></td>
                            <td>
                                <input class="common-input sort-input" name="<?php echo ($vo["id"]); ?>" value="<?php echo ($vo["sort"]); ?>" type="text">
                            </td>
                            <!--<td><?php echo ($vo["id"]); ?></td>-->
                            <td><?php if($vo['parentid'] != 0): ?>|<?php endif; echo str_repeat('-', $vo['level']*5); echo ($vo["name"]); ?></td>

                            <!--<td>-->
                                <!--<?php if($vo['type'] == 1 ): ?>列表<?php endif; ?>-->
                                <!--<?php if($vo['type'] == 2 ): ?>单页<?php endif; ?>-->
                                <!--<?php if($vo['type'] == 3 ): ?>留言板<?php endif; ?>-->
                                <!--<?php if($vo['type'] == 4 ): ?>广告<?php endif; ?>-->
                            <!--</td>-->
                            <td><?php if($vo['keywords'] != ''): echo ($vo["keywords"]); else: ?>暂无关键词<?php endif; ?></td>
                            <td>
                            <?php if($vo['class'] == 1 ): ?>顶级栏目<?php endif; ?>
                            <?php if($vo['class'] == 2 ): ?>二级栏目<?php endif; ?>
                            <?php if($vo['class'] == 3 ): ?>三级栏目<?php endif; ?>
                            </td>
                            <td><?php if($vo['des'] != ''): echo ($vo["des"]); else: ?>暂无描述<?php endif; ?></td>

                            <td><?php if($vo['pic'] != ''): ?><img src="/car_peak<?php echo ($vo["pic"]); ?>" height="70" whit="50"></td>
                            <?php else: ?>暂无缩略图<?php endif; ?>

                            <td>
                                <a class="link-update" href="/car_peak/index.php/Admin/Backstage/edit/id/<?php echo ($vo["id"]); ?>">修改</a>
                                <a class="link-del" onclick="return confirm('确定删除本栏目及其子栏目？');" href="/car_peak/index.php/Admin/Backstage/del/id/<?php echo ($vo["id"]); ?>">删除</a>
                            </td><?php endforeach; endif; else: echo "" ;endif; ?>
                        </tr>
                    </table>
                    <div class="list-page"><?php echo ($page); ?></div>
                </div>
            </form>
        </div>
    </div>

</div>
</body>
</html>
<script type="text/javascript">
    $("#check").click(function(){
        if($(this).attr("checked"))
        {
            $(".check").attr("checked","checked")
        }else
        {
            $(".check").removeAttr("checked")
        }
    })
</script>